package com.yilin.platform.base_core.commons.base;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.platform.base_core.commons.entity.AuthData;
import com.yilin.platform.base_core.commons.entity.AuthStatus;
import com.yilin.platform.base_core.commons.annotation.Explain;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
import java.util.Date;

@MappedSuperclass
public class BaseAuth extends BaseEntity {

    /**
     * 平台信息
     */
    @Column(name = "organize_id")
    private String organizeId;//组织ID
    @Column(name = "organize_name")
    private String organizeName;//组织名称
    @Explain("上级平台")
    @Column(name = "superior_plat_id")
    private String superiorPlatId;
    @Explain("上级平台")
    private String superiorPlatName;

    @Explain("逻辑删除")
    @TableLogic
    @Column(name = "is_deleted", columnDefinition = "INT default 0")
    private Integer isDeleted;

    @Column(name = "auth_status")
    private AuthStatus authStatus;
    @Column(name = "aut_user_id")
    private String autUserId;// 审核人
    @Column(name = "aut_user_name")
    private String autUserName;// 审核人
    @Column(name = "aut_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date autTime;// 审核时间
    @Column(name = "failed_msg")
    private String failedMsg;//认证未通过原因

    @Column(name = "warn_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date warnDate;//预警时间
    @Column(name = "expire_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expireDate;//强制到期时间
    @Column(name = "notice_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date noticeDate;//通知时间

    @Transient
    @TableField(exist = false)
    private AuthData.AuthItem authItem;

    public String getSuperiorPlatId() {
        return superiorPlatId;
    }

    public void setSuperiorPlatId(String superiorPlatId) {
        this.superiorPlatId = superiorPlatId;
    }

    public String getSuperiorPlatName() {
        return superiorPlatName;
    }

    public void setSuperiorPlatName(String superiorPlatName) {
        this.superiorPlatName = superiorPlatName;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public AuthStatus getAuthStatus() {
        return authStatus;
    }

    public void setAuthStatus(AuthStatus authStatus) {
        this.authStatus = authStatus;
    }

    public String getAutUserId() {
        return autUserId;
    }

    public void setAutUserId(String autUserId) {
        this.autUserId = autUserId;
    }

    public String getAutUserName() {
        return autUserName;
    }

    public void setAutUserName(String autUserName) {
        this.autUserName = autUserName;
    }

    public Date getAutTime() {
        return autTime;
    }

    public void setAutTime(Date autTime) {
        this.autTime = autTime;
    }

    public String getFailedMsg() {
        return failedMsg;
    }

    public void setFailedMsg(String failedMsg) {
        this.failedMsg = failedMsg;
    }

    public String getOrganizeId() {
        return organizeId;
    }

    public void setOrganizeId(String organizeId) {
        this.organizeId = organizeId;
    }

    public String getOrganizeName() {
        return organizeName;
    }

    public void setOrganizeName(String organizeName) {
        this.organizeName = organizeName;
    }

    public Date getWarnDate() {
        return warnDate;
    }

    public void setWarnDate(Date warnDate) {
        this.warnDate = warnDate;
    }

    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    public Date getNoticeDate() {
        return noticeDate;
    }

    public void setNoticeDate(Date noticeDate) {
        this.noticeDate = noticeDate;
    }

    public AuthData.AuthItem getAuthItem() {
        return authItem;
    }

    public void setAuthItem(AuthData.AuthItem authItem) {
        this.authItem = authItem;
    }
}
